<div class="container-fluid mt-xs">
    <div class="text-danger" ng-repeat="schema in appConfig.schemaStatus" ng-if="schema.error">
        <div class="callout callout-danger">
            <h4>Error in {{schema.name}} schema: expected version {{schema.expectedVersion}}, got {{schema.currentVersion}}</h4>
            <p>Please contact the administrator</p>
        </div>
    </div>
</div>

<div class="login-box">
    <div class="login-logo">
        <img src="images/logo.svg" height="70"/>
    </div>
    <div class="login-box-body">
        <p class="login-box-msg">Sign in to start your session</p>
        <form name="loginForm">
            <div class="form-group has-feedback has-feedback-left">
                 <input type="text" class="form-control" placeholder="Login" ng-model="params.username" autocomplete="off" required>
                 <i class="form-control-feedback glyphicon glyphicon-user"></i>
            </div>
            <div class="form-group has-feedback has-feedback-left">
                <input type="password" class="input form-control" placeholder="Password" ng-model="params.password" autocomplete="off" required>
                <i class="form-control-feedback glyphicon glyphicon-lock "></i>
            </div>
            <div class="mv-s" ng-if="params.requireMfa === true">
                <div class="text-danger text-center">
                    Please provide MFA code
                </div>
                <div class="form-group has-feedback has-feedback-left">
                    <input type="text" class="input form-control" placeholder="Code" ng-model="params.mfaCode" autocomplete="off" ng-required="params.requireMfa">
                    <i class="form-control-feedback glyphicon glyphicon-qrcode"></i>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12">
                    <button type="submit" ng-click="login()" class="btn btn-primary btn-block" ng-disabled="loginForm.$invalid">Sign In</button>
                </div>
            </div>

            <div ng-if="::ssoEnabled()">
                <div class="mt-s or-separator">OR</div>

                <div class="mv-xs">
                    <a class="btn btn-success btn-m btn-block" href="./api/ssoLogin">Sign In with SSO</a>
                </div>

                <div class="text-danger wrap" ng-if="ssoError">
                    {{ssoError}}
                </div>

            </div>
        </form>
    </div>

    <div class="text-center mv-xs text-muted">
        <small>Version: {{version}}</small>
    </div>
</div>
